#include"Common.hpp"



int main()
{
    info.GetKey();
    info.CreatShemid();
    info.Attchshm();
    struct shinfo*share=(struct shinfo*)info.Addr();
    sleep(5);
    mkfifo("/fifo",0600);
    int fd=open("/fifo",O_RDONLY);
    char str[10];
    while(true)
    {
        int size=read(fd,str,10);
        if(size==0)
            break;
        cout<<share->time<<endl;
        cout<<share->status<<endl;
    }

    info.Deattch();
    info.Rmshm();
    unlink("\fifo");
    return 0;
}